<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no"/>
    <link rel="stylesheet" href="css/common.css"/>
    <link rel="stylesheet" href="css/sm.min.css"/>
    <link rel="stylesheet" href="css/info.css"/>

    <title></title>
</head>
<body>
<script src="../js/overall_mask.js"></script>
    <div id="address_add" class="page">
        <header>
            <div class="header header-border">
                <a href="javascript:window.history.back();" class="l"><i class="icon icon-arrowleft"></i></a>
                <div class="c">添加地址</div>
                <div class="r"></div>
            </div>
        </header>
        <div class="content">
            <div class="address_info_list">
                <ul>
                    <li>
                        <p>* 收货人姓名</p>
                        <div class="inbox">
                            <input type="text" class="info_inp"/><i class="icon icon-wrong"></i>

                        </div>
                    </li>
                    <li>
                        <p>* 手机号码</p>
                        <div class="inbox">
                            <input type="text" class="info_inp" placeholder="电话"/>
                            <i class="icon icon-wrong"></i>
                        </div>
                    </li>
                    <li>
                        <p>* 省市区 </p>
                        <div class="inbox" >
                            <input type="text" class="info_inp" id="city_pick"/>
                            <i class="icon icon-wrong"></i>
                        </div>
                    </li>
                    <li>
                        <p>* 具体地址</p>
                        <div class="inbox">
                            <input type="text" class="info_inp" placeholder="请输入您的小区、单元、门牌号"/>
                            <i class="icon icon-wrong"></i>
                        </div>
                    </li>
                </ul>
            </div>
             <div class="moren on">
                   <i class="icon icon-yeschoose yeschoose"></i>
                   <i class="icon icon-nochoose nochoose"></i>
                 <span>设为默认地址</span>
                 <small>(每次订餐都会默认使用该地址)</small>
             </div>
            <div class="cw-btn cw-btn-long auto sure_add">确定</div>
        </div>
    </div>
    <!--<script src="js/jquery-1.7.2.min.js"></script>-->
    <script src="js/zepto.js"></script>
    <script src="js/sm.min.js"></script>
    <script src="js/sm-city-picker.js"></script>
    <script>
        function inbox(){
            var i = $('.inbox i');
            var input =  $('.inbox input');
            i .on('touchend',function(){
                $(this).prev().val("");
                $(this).parent().removeClass('on');
            });
            input.on('focus',function(){
                if($(this).val()){
                    $(this).parent().addClass('on');
                }
            });
            input.on('input',function(){
                if($(this).val()){
                    $(this).parent().addClass('on');
                }else{
                    $(this).parent().removeClass('on');
                }
            })
        }
        inbox();
        $(document).ready(function(){
            $("#city_pick").cityPicker({ });
            $.init();
            $('.moren').on('touchend',function(){
                $(this).toggleClass('on')
            })
        });

    </script>
</body>
</html>